#!/bin/bash

filePath="./books/"
fileName="Demo.md"



echo "Start create codelab... ..."

if [ -z $1   ]
then
   echo "Use default md file: Demo.md"
else
    fileName=$1
fi

mdfile=$filePath$fileName

if [ -e $mdfile ]
then
   echo "Check file ok..."
else
   echo "File doesn't exist, please check: "$mdfile
   exit 0;
fi

echo "generate codelab  with file: "$mdfile
claat export  -o ../  $mdfile

echo "Codelab generate successfully !"

echo "Start reload whold website with command gulp serve:reload"

gulp serve:reload